﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TopButtonManager : MonoBehaviour {
	private int gameState = 0;
	private int pause = 1;
	private int running = 0;


	// Use this for initialization
	void Start () {
		gameState = running;
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void Pause()
	{
		if(gameState == running)
		{
			Time.timeScale = 0;
			gameState = pause;
		}
		else if(gameState == pause)
		{
			Time.timeScale = 1;
			gameState = running;						
		}
	}
}
